|
Data splitting Let us pay attention to a peculiarity of the report with fishes: there is much blank space at bottom of the pages. Why does it happen? When a report is constructed, the FastReport core fills whitespace of the page with bands. After displaying each band, the current position shifts down. When FastReport finds out that there is not enough space to display the next band (its height is larger than white space left on the page), then a new page is formed and band displaying continues there. This operation continues being performed as long as there are notes in data set. Our report contains an object with large text, and that is why the band height is rather large. Furthermore, if a large band does not find room on a page, it is transferred to the next one, and much unused space remains at the bottom of the page. This is shown at the following picture:
To use paper more rationally, let us use a FastReport feature, which paragraphs the band contents. All we need is to enable the "AllowSplit" option of the "First level data" band. You see that there becomes less of white space at the bottom of report pages:
How does the band splitting work? There are some objects in FastReport, which support this feature. They are the "Text," "Line," and "RichEdit" objects. They can be "splitted," while other objects cannot. When FastReport comes across the necessity of splitting accomplishment, it performs it in the following way: - displays the non-splittable objects, which find room on white space; The splitting algorithm will become clearer if to look at the picture:
It should be noted, that the splitting algorithm does not provide 100% quality of the received report. That is why you should use this option very carefully in cases when objects on the splitted band are grouped in a complicated way, and, in addition, their font sizes differ. Here is the example of what could be received:
|